#include "Stream_ll.h"

inline uint16_t word(uint8_t highbyte, uint8_t lowbyte)
{
    uint16_t ret;
    ret = (uint16_t)highbyte;
    ret = (ret << 8) + (uint16_t)lowbyte;
    return ret;
}

inline uint8_t lowByte(uint16_t data)
{
    uint8_t ret;
    ret = 0x00FF & data;
    return ret;
}

inline uint8_t highByte(uint16_t data)
{
    uint8_t ret;
    ret = (0xFF00 & data) >> 8;
    return ret;
}

inline bool bitRead(uint8_t data, uint8_t n)
{
    uint8_t ret = 1;
    ret = (ret << n) & data;
    ret = ret >> n;
    if(ret == 0)
        return false;
    else
        return true;
}

